BIOS Calls via Trap 13

#include osbind.h>

Available devices for BIOS calls are:

Device#


_PRT0parallel port _AUX1serial port _CON2console _MIDI3MIDI port _IKBD4keyboard processor _RAWCON5console (no terminal emulation)

long Bconin(short dev); Read a character from device dev. (Allowed devices: 0…3

void Bconout(short dev, short c); Write character c to device dev. (Allowed devices: 0…5)

short Bconstat(short dev); Get the status of the input device dev. (Allowed devices: 1…3).

short Bcostat(short dev); Get the status of the output device dev. (Allowed devices: 0…4)

long Drvmap(); Get the bitmap of available drives.

BPB &sstarf#star;Getbpb(short dev); Get the BIOS parameter block of device dev.

void Getmpb(void &sstarf#star;ptr); The memory parameter block pointed to by ptr is filled.

long Kbshift(short mode); Get (mode = -1) or set the current keyboard status.

=The return value is composed of the following fields:

BitMeaning


0Right shift key 1Left shift key 2Control key 3Alternate key 4Caps lock key 5r. mouse button (ClrHome) 6l. mouse button (Insert) 7Reserved (0)

short Mediach(short dev); Check, if disk in device dev has changed.

short Rwabs(short rwflag, long buf, short n, short sector, short dev); Read (rwflag = 0) or write (rwflag = 1) n logical sectors from device dev.

void (&sstarf#star;)(void) Setexc(short vecnum, long vecptr); Get (vecptr = -1) or set an M68000 exception vector.

long Tickcal(); Get the number of milliseconds between two calls of tickcal.